home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2500 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: news.cnetech.com!news
  2. From: codepoet <codepoet@cnetech.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: extern Login *lgn;   is this all there is?
  5. Date: 18 Jan 1996 03:11:00 GMT
  6. Organization: Nation BBS Systems
  7. Message-ID: <4dkdo4$rlp@news.cnetech.com>
  8. NNTP-Posting-Host: dialup18.cnetech.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.22 (Windows; U; 16bit)
  13.  
  14. I am writeing a BBS. It is compiled with Turbo C++ 3.0. The first version 
  15. of this BBS was written in standard C with the same compiler. In this new 
  16. version, I wanted to use OOP. My first module was BWork, a binary record 
  17. keeper. It basically loads and saves binary records, like my other module 
  18. UserRec. I use BWork in UserRec, since User Records are Binary records and 
  19. need to be saved and loaded from disk. At the top of UserRec I declare 
  20. BWork as an extern, because BWork is used in many other modules, and not 
  21. just UserRec. There are about 50 other modules also, like Login, Mail, 
  22. MesgBase (which is derrived from Mail f coarse), etc. At the top of all of 
  23. thoese modules, I must include my extern statements to include all other 
  24. modules that this module will require. After a while I feel as if I am 
  25. violating some C++ rule of ethics because almost every module needs 
  26. another (with maybe the exception of Tyme and Dayt). My question is this: 
  27. Is it accepted practice to have a list of 10 or more extern's in each 
  28. module? Or is it true that somewhere down the line, my Object methodology 
  29. got bumbled and there *really* is a way to have modules with no module 
  30. needing another module. Basically, if I wanted to let someone else use my 
  31. userRec class, they would be stuck with 10 other classs! What can be done?
  32.  
  33.  
  34.